home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FGL304E.ZIP;1 / EXPAS.ARJ / FGDOC / EXAMPLES / PASCAL / 06-08.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-01-24  |  879 b   |  43 lines

  1. program main;
  2. uses fgmain, fgmisc;
  3.  
  4. const
  5.   VERTICES = 10;
  6.   xy : array [1..2*VERTICES] of integer = (
  7.          200,100, 300, 80, 400,100, 400,220, 300,320,
  8.          240,320, 160,240, 160,200, 200,160, 210,150);
  9.  
  10. var
  11.   old_mode : integer;
  12.   work_array : array [1..700] of integer;
  13.  
  14. begin
  15.   old_mode := fg_getmode;
  16.  
  17.   if (fg_testmode(16,1) = 1) then
  18.      fg_setmode(16)
  19.   else if (fg_testmode(15,1) = 1) then
  20.      fg_setmode(15)
  21.   else
  22.   begin
  23.     write('This program requires a 640 x 350 ');
  24.     writeln('EGA graphics mode.');
  25.     exit;
  26.   end;
  27.  
  28.   fg_setcolor(1);
  29.   fg_polyoff(-120,-25);
  30.   fg_polyline(xy,VERTICES);
  31.   fg_polyoff(200,-25);
  32.   fg_polyfill(xy,work_array,VERTICES);
  33.   fg_waitkey;
  34.  
  35.   fg_setcolor(2);
  36.   fg_setclip(480,639,175,349);
  37.   fg_polyfill(xy,work_array,VERTICES);
  38.   fg_waitkey;
  39.  
  40.   fg_setmode(old_mode);
  41.   fg_reset;
  42. end.
  43.